package com.fengmi.sso.controller;


import com.fengmi.sso.entity.SysUser;
import com.fengmi.sso.service.ISysUserService;
import com.fengmi.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author zhuxm
 * @since 2022-03-11
 */
@RestController
@RequestMapping("/sso/user")
public class SysUserController {

    @Autowired
    private ISysUserService sysUserService;


    @RequestMapping("login")
    public ResultVO login(@RequestBody SysUser sysUser){

        return sysUserService.login(sysUser);
    }


    @RequestMapping("verify")
    public ResultVO verify(@RequestHeader("token") String token){

        return sysUserService.verify(token);
    }

}
